#pragma once

#include <string> // std::string
typedef std::string string;
typedef const string predefinedsymbol[1];
typedef const string* symbolreference;

#ifdef GRAPHENETOOLS_EXPORTS
#ifndef GRAPHENETOOLS_DLL_API
#define GRAPHENETOOLS_DLL_API __declspec(dllexport)
#endif
#else
#ifndef GRAPHENETOOLS_DLL_API
#define GRAPHENETOOLS_DLL_API __declspec(dllimport)
#endif
#endif

class GRAPHENETOOLS_DLL_API symbol
{
public:
	// Enum declaring possible values of a symbol.
	enum type {
		empty,		// Is an empty symbol.
		predefined,	// Is a predefined symbol.
		userdefined	// Is a userdefined symbol.
	};
	
	static predefinedsymbol all;		// Predefined symbol all.
	static predefinedsymbol none;		// Predefined symbol none.
	static predefinedsymbol automatic;	// Predefined symbol automatic.

private:
	symbolreference referencevalue; // An optional container pointing the a predefined symbol (in the form of a const string).
	string userstring;				// An optional container containing a user defined symbol (in the form of a string).

public:
	symbol();							// Default constructor that creates an empty symbol.
	symbol(const symbol &s);			// Copy constructor that creates an identical symbol.
	symbol(const symbolreference &ps);	// Conversion constructor that creates a predefined symbol *ps.
	symbol(const string &us);			// Conversion constructor that creates a userdefined symbol with string us.
	
	type getType() const;				// This getter function returns the value.
	symbolreference reference() const;	// This getter function returns the reference of the predefined symbol (actually a pointer to a const).
	string name() const;				// This getter function returns the name of the symbol.
};

